package io_file_output;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

public class Test {
    public static void main(String[] args) throws IOException {
        //FileOutputStream
        //FileWriter
        //BufferedWriter
        //PrintWriter
        FileOutputStream fos =
            new FileOutputStream(new File("ikun.txt"));
        fos.write("Hello World".getBytes());
        fos.write('b');

        byte[] bytes="米浴".getBytes();
        fos.write(bytes);
        fos.write("\r\n".getBytes());
        fos.write(bytes,3,2);
        fos.close(); // Suppressed exception: java.io.IOException

    }
}
